package com.probiz.estore.customer.service;

import javax.servlet.http.HttpServletRequest;

import com.probiz.estore.common.model.customer.ConsultAndVoteVO;
import com.probiz.estore.common.model.customer.ConsultVote;
import com.probiz.estore.core.service.GenericManager;

/**
 * Manager interface for ConsultVote, responsible for business processing, and communicate between web and persistence layer.
 *
 */
public interface ConsultVoteManager extends GenericManager<ConsultVote> {
	/**
	 * 检查是否已经投票了
	 * @param consultId
	 * @param customerId
	 * @return
	 */
	public boolean isVoteAlready(Integer consultId, Integer customerId);
	/**
	 * 进行投票
	 * @param request
	 * @param consultId
	 * @param chosen
	 * @return ConsultAndVoteVO.result 0 表示未登录 1 表示成功 2 表示重复投票 
	 */
	public ConsultAndVoteVO doVote(HttpServletRequest request,Integer consultId, Short chosen);
}
